package com.tchhy.provider.data.profit.response

import android.os.Parcel
import android.os.Parcelable

/**
 * @author: pujialin
 * @date: 2020-10-21 18:05
 * @desc:
 */
class UserIdenAuthenInfo() :Parcelable {
    var realName:String? = null
    //身份证号
    var idCard:String? = null
    //是否已实名 1 实名 2 未实名
    var isIdenAuthen: Int? = null
    //身份证姓名
    var idenName:String? = null
    //身份证住址
    var address:String? = null
    var birthday:String? = null
    //是否和实名信息一致 true 一致
    var isEqual:Boolean? = null
    //是否通过 ocr 认证: 0 未认证 1 已认证
    var isOcr:Int? = null
    //民族
    var nation:String? = null
    //签发机关
    var police:String? = null
    //起始有效日期
    var validityBeginDate:String? = null
    //结束有效日期
    var validityEndDate:String? = null

    constructor(parcel: Parcel) : this() {
        realName = parcel.readString()
        idCard = parcel.readString()
        isIdenAuthen = parcel.readValue(Int::class.java.classLoader) as? Int
        idenName = parcel.readString()
        address = parcel.readString()
        birthday = parcel.readString()
        isEqual = parcel.readValue(Boolean::class.java.classLoader) as? Boolean
        isOcr = parcel.readValue(Int::class.java.classLoader) as? Int
        nation = parcel.readString()
        police = parcel.readString()
        validityBeginDate = parcel.readString()
        validityEndDate = parcel.readString()
    }

    override fun writeToParcel(parcel: Parcel, flags: Int) {
        parcel.writeString(realName)
        parcel.writeString(idCard)
        parcel.writeValue(isIdenAuthen)
        parcel.writeString(idenName)
        parcel.writeString(address)
        parcel.writeString(birthday)
        parcel.writeValue(isEqual)
        parcel.writeValue(isOcr)
        parcel.writeString(nation)
        parcel.writeString(police)
        parcel.writeString(validityBeginDate)
        parcel.writeString(validityEndDate)
    }

    override fun describeContents(): Int {
        return 0
    }

    companion object CREATOR : Parcelable.Creator<UserIdenAuthenInfo> {
        override fun createFromParcel(parcel: Parcel): UserIdenAuthenInfo {
            return UserIdenAuthenInfo(parcel)
        }

        override fun newArray(size: Int): Array<UserIdenAuthenInfo?> {
            return arrayOfNulls(size)
        }
    }


}